home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / include / plplotP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-25  |  18.5 KB  |  781 lines

  1. /* $Id: plplotP.h,v 1.29 1994/08/25 04:03:17 mjl Exp $
  2.  * $Log: plplotP.h,v $
  3.  * Revision 1.29  1994/08/25  04:03:17  mjl
  4.  * Eliminated an unnecessary header file inclusion.
  5.  *
  6.  * Revision 1.28  1994/08/03  20:12:43  mjl
  7.  * Eliminated #undef of _POSIX_SOURCE on Crays -- no longer needed now that
  8.  * caddr_t is defined in plConfig.h (if not typedef'ed by <sys/types.h>).
  9.  *
  10.  * Revision 1.27  1994/07/29  20:19:31  mjl
  11.  * Added typedef for CWindow -- window coordinate structure, also prototypes
  12.  * for plAddCWindow() and plClrCWindows(void) (contributed by Paul Casteels).
  13.  * Also prototype for new plLibOpen() function.
  14.  *
  15.  * Revision 1.26  1994/07/26  21:14:38  mjl
  16.  * Improvements to the way PLplot looks for various files.  Now more
  17.  * consistent and flexible.  In particular, environmentals can be set for
  18.  * locations of each directory (for Tcl, binary, and library files).
  19.  * Contributed by Mark Olesen.
  20.  *
  21.  * Revision 1.25  1994/07/24  07:41:46  mjl
  22.  * Eliminated some more system-dependent stuff, in view of plConfig.h
  23.  * providing us with the _POSIX_SOURCE define (or not).
  24.  *
  25.  * Revision 1.24  1994/07/23  04:46:26  mjl
  26.  * Decreased the amount of custom system handling due to use of plConfig.h.
  27.  * Need to do some more yet...
  28.  *
  29.  * Revision 1.23  1994/07/22  15:54:09  furnish
  30.  * Fix overaggressive behavior.
  31.  *
  32.  * Revision 1.22  1994/07/19  22:35:04  mjl
  33.  * Added includes for pdf.h and plConfig.h.
  34.  *
  35.  * Revision 1.21  1994/06/30  18:36:06  mjl
  36.  * Removed prototypes for deleted accessor functions.  Inserted an extern
  37.  * PLStream *plsc declaration for easier access to PLplot state info (only
  38.  * plcore.h, which declares the real plsc, doesn't see this declaration).
  39.  * Now includes plstream.h.
  40. */
  41.  
  42. /*
  43.     plplotP.h
  44.  
  45.     Copyright (C) 1993 by 
  46.     Maurice J. LeBrun, Geoff Furnish, Tony Richardson.
  47.  
  48.     Internal (private) macros and prototypes for the PLPLOT package.  This
  49.     header file must be included before all others, including system header
  50.     files.
  51.  
  52.     This software may be freely copied, modified and redistributed without
  53.     fee provided that this copyright notice is preserved intact on all
  54.     copies and modified copies. 
  55.  
  56.     There is no warranty or other guarantee of fitness of this software.
  57.     It is provided solely "as is". The author(s) disclaim(s) all
  58.     responsibility and liability with respect to this software's usage or
  59.     its effect upon hardware or computer systems. 
  60. */
  61.  
  62. #ifndef __PLPLOTP_H__
  63. #define __PLPLOTP_H__
  64.  
  65. /*----------------------------------------------------------------------*\
  66.  *        SYSTEM-SPECIFIC SETTINGS
  67.  * 
  68.  * Here we enable or disable based on system specific capabilities of
  69.  * PLPLOT.  At present there are only two different "optional"
  70.  * capabilities.  They are:
  71.  *
  72.  * POSIX_TTY    Defined if POSIX.1 tty control functions are available. 
  73.  * STDC_HEADERS    Defined if libc is ANSI-compliant.
  74.  *
  75.  * POSIX.1 tty control functions are used by some of the drivers, e.g. to
  76.  * switch to character-oriented (CBREAK) i/o (notably the tek driver and
  77.  * all its variants).  It is usable without this but not as powerful.  The
  78.  * reason for using this is that some supported systems are still not
  79.  * POSIX.1 compliant (and some may never be).
  80.  *
  81.  * ANSI libc calls are used for: (a) setting up handlers to be called
  82.  * before program exit (via the "atexit" call), and (b) for seek
  83.  * operations.  Again, the code is usable without these.  An ANSI libc
  84.  * should be available, given the requirement of an ANSI compiler.  Some
  85.  * reasons why not: (a) the vendor didn't supply a complete ANSI
  86.  * environment, or (b) the ANSI libc calls are buggy, or (c) you ported
  87.  * gcc to your system but not glibc (for whatever reason).  Note: without
  88.  * an ANSI C lib, if you ^C out of a program using one of the PLplot tek
  89.  * drivers, your terminal may be left in a strange state.
  90.  * 
  91. \*----------------------------------------------------------------------*/
  92.  
  93. #include "plConfig.h"
  94.  
  95. #ifdef _POSIX_SOURCE
  96. #define POSIX_TTY
  97. #endif
  98.  
  99. /* Hacks to deal with non-ANSI libc */
  100.  
  101. #ifdef STDC_HEADERS
  102. #define FPOS_T fpos_t
  103. #define pl_fsetpos(a,b) fsetpos(a, b)
  104. #define pl_fgetpos(a,b) fgetpos(a, b)
  105.  
  106. #else
  107. #define FPOS_T long
  108. #define pl_fsetpos(a,b) fseek(a, *b, 0)
  109. #define pl_fgetpos(a,b) (-1L == (*b = ftell(a)))
  110. #endif
  111.  
  112. /* Include all externally-visible definitions and prototypes */
  113. /* plplot.h also includes some handy system header files */
  114.  
  115. #include "plplot.h"
  116. #include "plstream.h"
  117.  
  118. /* If not including this file from inside of plcore.h, declare plsc */
  119.  
  120. #ifndef __PLCORE_H__
  121. extern PLStream    *plsc;
  122. #endif
  123.  
  124. /*----------------------------------------------------------------------*\
  125.  *            Data types
  126. \*----------------------------------------------------------------------*/
  127.  
  128. /* Signed char type, for the font tables */
  129.  
  130. typedef signed char SCHAR;
  131.  
  132. /* Window coordinate structure */
  133.  
  134. typedef struct {
  135.     PLFLT vpx1, vpx2, vpy1, vpy2;
  136.     PLFLT wx1, wx2, wy1, wy2;
  137. } CWindow;
  138.  
  139. /*----------------------------------------------------------------------*\
  140.  *                       Utility macros
  141. \*----------------------------------------------------------------------*/
  142.  
  143. #ifndef TRUE
  144. #define TRUE  1
  145. #define FALSE 0
  146. #endif
  147.  
  148. /* For the truly desperate debugging task */
  149.  
  150. #ifdef DEBUG_ENTER
  151. #define dbug_enter(a) \
  152.     fprintf(stderr, "%s: Entered %s\n", __FILE__, a);
  153.  
  154. #else
  155. #define dbug_enter(a)
  156. #endif
  157.  
  158. /* Used to help ensure everything malloc'ed gets freed */
  159.  
  160. #define free_mem(a) \
  161.     if (a != NULL) { free((void *) a); a = NULL; }
  162.  
  163. /* Allows multi-argument setup calls to not affect selected arguments */
  164.  
  165. #define plsetvar(a, b) \
  166.     if (b != PL_NOTSET) a = b;
  167.  
  168. /* Lots of cool math macros */
  169.  
  170. #ifndef MAX
  171. #define MAX(a,b)    (((a) > (b)) ? (a) : (b))
  172. #endif
  173. #ifndef MIN
  174. #define MIN(a,b)    (((a) < (b)) ? (a) : (b))
  175. #endif
  176. #ifndef ABS
  177. #define ABS(a)      ((a)<0 ? -(a) : (a))
  178. #endif
  179. #ifndef ROUND
  180. #define ROUND(a)    (PLINT)((a)<0. ? ((a)-.5) : ((a)+.5))
  181. #endif
  182. #ifndef BETW
  183. #define BETW(ix,ia,ib)  (((ix)<=(ia)&&(ix)>=(ib)) || ((ix)>=(ia)&&(ix)<=(ib)))
  184. #endif
  185. #ifndef SSQR
  186. #define SSQR(a,b)       sqrt((a)*(a)+(b)*(b))
  187. #endif
  188. #ifndef SIGN
  189. #define SIGN(a)         ((a)<0 ? -1 : 1)
  190. #endif
  191.  
  192. /* A coordinate value that should never occur */
  193.  
  194. #define UNDEFINED -9999999
  195.  
  196. /*----------------------------------------------------------------------*\
  197.  *                       PLPLOT control macros
  198. \*----------------------------------------------------------------------*/
  199.  
  200. /* Some constants */
  201.  
  202. #define PL_MAXPOLY    256    /* Max segments in polyline or polygon */
  203. #define PL_NSTREAMS    100    /* Max number of concurrent streams. */
  204. #define PL_MAXWINDOWS    64    /* Max number of windows/page tracked */
  205. #define PL_RGB_COLOR    1<<7    /* A hack */
  206.  
  207. #define TEXT_MODE    0
  208. #define GRAPHICS_MODE    1
  209. #ifndef PI
  210. #define PI        3.1415926535897932384
  211. #endif
  212.  
  213. /* These define the metafile & X driver (virtual) coordinate systems */
  214.  
  215. #define PIXELS_X    8192        /* Number of virtual pixels in x */
  216. #define PIXELS_Y    8192        /* Number of virtual pixels in x */
  217. #define LPAGE_X        254.0        /* Page length in x in virtual mm */
  218. #define LPAGE_Y        190.5        /* Page length in y in virtual mm */
  219.  
  220. /* Switches for state function call. */
  221.  
  222. #define PLSTATE_WIDTH        1    /* pen width */
  223. #define PLSTATE_COLOR0        2    /* change to color in cmap 0 */
  224. #define PLSTATE_COLOR1        3    /* change to color in cmap 1 */
  225. #define PLSTATE_FILL        4    /* set area fill attribute */
  226. #define PLSTATE_CMAP0        5    /* change to cmap 0 */
  227. #define PLSTATE_CMAP1        6    /* change to cmap 1 */
  228.  
  229. /* Bit switches used in the driver interface */
  230.  
  231. #define PLDI_MAP    0x01
  232. #define PLDI_ORI    0x02
  233. #define PLDI_PLT    0x04
  234. #define PLDI_DEV    0x08
  235.  
  236. /* Default size for family files, in KB.
  237.  *  If you want it bigger, set it from the makefile or at runtime.
  238.  */
  239.  
  240. #ifndef PL_FILESIZE_KB
  241. #define PL_FILESIZE_KB 1000
  242. #endif
  243.  
  244. /* Font file names. */
  245.  
  246. #define PLPLOT5_FONTS
  247.  
  248. #ifdef PLPLOT5_FONTS
  249. #define PL_XFONT    "plxtnd5.fnt"
  250. #define PL_SFONT    "plstnd5.fnt"
  251. #else
  252. #define PL_XFONT    "plxtnd4.fnt"
  253. #define PL_SFONT    "plstnd4.fnt"
  254. #endif
  255.  
  256. /* ////////////////////////////////////////////////////////////////
  257. // The following PLPLOT_xxx environment variables are defined:
  258. //    PLPLOT_BIN      # where to find executables
  259. //    PLPLOT_LIB      # where to find library files (fonts, maps, etc)
  260. //    PLPLOT_TCL      # where to find tcl scripts
  261. //
  262. //    PLPLOT_HOME     # basename of plplot hierarchy
  263. //
  264. // search order:
  265. //    1)    the most specific possible locators, one of
  266. //            $(PLPLOT_BIN)
  267. //            $(PLPLOT_LIB)
  268. //            $(PLPLOT_TCL)
  269. //        as appropriate
  270. //
  271. //    2)    the current directory
  272. //
  273. //    3)    one of  $(PLPLOT_HOME)/bin
  274. //            $(PLPLOT_HOME)/lib
  275. //            $(PLPLOT_HOME)/tcl
  276. //        as appropriate
  277. //
  278. //    4)    as appropriate, the compile-time (Makefile)
  279. //        BIN_DIR, LIB_DIR, TCL_DIR
  280. //
  281. //  8 Jun 1994  mj olesen (olesen@weber.me.queensu.ca)
  282. //
  283. // Other notes:
  284. //
  285. // In addition to the directories above, the following are also used:
  286. //
  287. // Lib file search path: PLLIBDEV (see plctrl.c).  This is checked last,
  288. // and is a system-dependent hardwired location.
  289. //
  290. // Tcl search path: $HOME/tcl is searched before the install location,
  291. // TCL_DIR.
  292. //
  293. /////////////////////////////////////////////////////////////////// */
  294.  
  295. #define PLPLOT_BIN_ENV          "PLPLOT_BIN"
  296. #define PLPLOT_LIB_ENV          "PLPLOT_LIB"
  297. #define PLPLOT_TCL_ENV          "PLPLOT_TCL"
  298. #define PLPLOT_HOME_ENV         "PLPLOT_HOME"
  299.  
  300. /*----------------------------------------------------------------------*\
  301.  *        Function Prototypes
  302. \*----------------------------------------------------------------------*/
  303.  
  304. #ifdef __cplusplus
  305. extern "C" {
  306. #endif
  307.     /* These should not be called directly by the user */
  308.  
  309. /* Determines interval between numeric labels */
  310.  
  311. void
  312. pldtik(PLFLT vmin, PLFLT vmax, PLFLT *tick, PLINT *nsubt,
  313.        PLINT *mode, PLINT *prec, PLINT digmax, PLINT *scale);
  314.  
  315. /* Draws a polyline within the clip limits. */
  316.  
  317. void
  318. plP_pllclp(PLINT *x, PLINT *y, PLINT npts,
  319.        PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, 
  320.        void (*draw) (short *, short *, PLINT));
  321.  
  322. /* Fills a polygon within the clip limits. */
  323.  
  324. void
  325. plP_plfclp(PLINT *x, PLINT *y, PLINT npts,
  326.        PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, 
  327.        void (*draw) (short *, short *, PLINT));
  328.  
  329. /* Pattern fills in software the polygon bounded by the input points. */
  330.  
  331. void
  332. plfill_soft(short *x, short *y, PLINT npts);
  333.  
  334. /* In case of an abort this routine is called.  It just prints out an */
  335. /* error message and tries to clean up as much as possible. */
  336.  
  337. void
  338. plexit(char *errormsg);
  339.  
  340. /* Just a front-end to exit().  */
  341.  
  342. void
  343. pl_exit(void);
  344.  
  345. /* A handy way to issue warnings, if need be. */
  346.  
  347. void
  348. plwarn(char *errormsg);
  349.  
  350. /* Same as plwarn(), but appends ", aborting plot" to the error message */
  351.  
  352. void
  353. plabort(char *errormsg);
  354.  
  355. /* Loads either the standard or extended font. */
  356.  
  357. void
  358. plfntld(PLINT fnt);
  359.  
  360. /* Release memory for fonts. */
  361.  
  362. void
  363. plfontrel(void);
  364.  
  365. /* Initializes color map 0. */
  366.  
  367. void
  368. plCmap0_init(void);
  369.  
  370. /* Initializes color map 1. */
  371.  
  372. void
  373. plCmap1_init(void);
  374.  
  375. /* Bin up cmap 1 space and assign colors to make inverse mapping easy. */
  376.  
  377. void
  378. plcmap1_calc(void);
  379.  
  380. /* Writes the Hershey symbol "ch" centred at the physical coordinate */
  381. /* (x,y). */
  382.  
  383. void
  384. plhrsh(PLINT ch, PLINT x, PLINT y);
  385.  
  386. /* Draws a slanting tick at position (mx,my) (measured in mm) of */
  387. /* vector length (dx,dy). */
  388.  
  389. void 
  390. plstik(PLFLT mx, PLFLT my, PLFLT dx, PLFLT dy);
  391.  
  392. /* Prints out a "string" at reference position with physical coordinates */
  393. /* (refx,refy). */
  394.  
  395. void
  396. plstr(PLINT base, PLFLT *xform, PLINT refx, PLINT refy, const char *string);
  397.  
  398. /* Draws a tick parallel to x. */
  399.  
  400. void
  401. plxtik(PLINT x, PLINT y, PLINT below, PLINT above);
  402.  
  403. /* Draws a tick parallel to y. */
  404.  
  405. void
  406. plytik(PLINT x, PLINT y, PLINT left, PLINT right);
  407.  
  408. /* Get x-y domain in world coordinates for 3d plots */
  409.  
  410. void
  411. plP_gdom(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax);
  412.  
  413. /* Get vertical (z) scale parameters for 3-d plot */
  414.  
  415. void
  416. plP_grange(PLFLT *p_zscl, PLFLT *p_zmin, PLFLT *p_zmax);
  417.  
  418. /* Get parameters used in 3d plots */
  419.  
  420. void
  421. plP_gw3wc(PLFLT *p_dxx, PLFLT *p_dxy, PLFLT *p_dyx, PLFLT *p_dyy,
  422.       PLFLT *p_dyz);
  423.  
  424. /* Get viewport boundaries in physical coordinates */
  425.  
  426. void
  427. plP_gvpp(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax);
  428.  
  429. /* Set viewport boundaries in physical coordinates */
  430.  
  431. void
  432. plP_svpp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax);
  433.  
  434. /* Get subpage boundaries in physical coordinates */
  435.  
  436. void
  437. plP_gspp(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax);
  438.  
  439. /* Get clip boundaries in physical coordinates */
  440.  
  441. void
  442. plP_gclp(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax);
  443.  
  444. /* Set clip boundaries in physical coordinates */
  445.  
  446. void
  447. plP_sclp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax);
  448.  
  449. /* Get physical device limits in physical coordinates */
  450.  
  451. void
  452. plP_gphy(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax);
  453.  
  454. /* Set physical device limits in physical coordinates */
  455.  
  456. void
  457. plP_sphy(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax);
  458.  
  459. /* Get number of subpages on physical device and current subpage */
  460.  
  461. void
  462. plP_gsub(PLINT *p_nx, PLINT *p_ny, PLINT *p_cs);
  463.  
  464. /* Set number of subpages on physical device and current subpage */
  465.  
  466. void
  467. plP_ssub(PLINT nx, PLINT ny, PLINT cs);
  468.  
  469. /* Set up plot parameters according to the number of subpages. */
  470.  
  471. void
  472. plP_subpInit(void);
  473.  
  474. /* Get font and color attributes */
  475.  
  476. void
  477. plP_gatt(PLINT *p_ifnt, PLINT *p_icol0);
  478.  
  479. /* Set font and color attributes */
  480.  
  481. void
  482. plP_satt(PLINT ifnt, PLINT icol0);
  483.  
  484. /* Get subpage boundaries in normalized device coordinates */
  485.  
  486. void
  487. plP_gspd(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax);
  488.  
  489. /* Get viewport boundaries in normalized device coordinates */
  490.  
  491. void
  492. plP_gvpd(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax);
  493.  
  494. /* Get viewport boundaries in normalized device coordinates */
  495.  
  496. void
  497. plP_svpd(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax);
  498.  
  499. /* Get viewport boundaries in world coordinates */
  500.  
  501. void
  502. plP_gvpw(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax);
  503.  
  504. /* Set viewport boundaries in world coordinates */
  505.  
  506. void
  507. plP_svpw(PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax);
  508.  
  509. /* Get number of pixels to a millimeter */
  510.  
  511. void
  512. plP_gpixmm(PLFLT *p_x, PLFLT *p_y);
  513.  
  514. /* Set number of pixels to a millimeter */
  515.  
  516. void
  517. plP_spixmm(PLFLT x, PLFLT y);
  518.  
  519. /* All the drivers call this to set physical pixels/mm. */
  520.  
  521. void
  522. plP_setpxl(PLFLT xpmm0, PLFLT ypmm0);
  523.  
  524. /* Get transformation variables for world coordinates to mm */
  525.  
  526. void
  527. plP_gwm(PLFLT *p_xscl, PLFLT *p_xoff, PLFLT *p_yscl, PLFLT *p_yoff);
  528.  
  529. /* Set transformation variables for world coordinates to mm */
  530.  
  531. void
  532. plP_swm(PLFLT xscl, PLFLT xoff, PLFLT yscl, PLFLT yoff);
  533.  
  534. /* Get transformation variables for millimeters from bottom left */
  535.  
  536. void
  537. plP_gmp(PLFLT *p_xscl, PLFLT *p_xoff, PLFLT *p_yscl, PLFLT *p_yoff);
  538.  
  539. /* Set transformation variables for millimeters from bottom left */
  540.  
  541. void
  542. plP_smp(PLFLT xscl, PLFLT xoff, PLFLT yscl, PLFLT yoff);
  543.  
  544. /* Get background parameters for 3d plot. */
  545.  
  546. void
  547. plP_gzback(PLINT **zbf, PLINT **zbc, PLFLT **zbt);
  548.  
  549. /* Move to physical coordinates (x,y). */
  550.  
  551. void
  552. plP_movphy(PLINT x, PLINT y);
  553.  
  554. /* Draw to physical coordinates (x,y). */
  555.  
  556. void
  557. plP_draphy(PLINT x, PLINT y);
  558.  
  559. /* Move to world coordinates (x,y). */
  560.  
  561. void
  562. plP_movwor(PLFLT x, PLFLT y);
  563.  
  564. /* Draw to world coordinates (x,y). */
  565.  
  566. void
  567. plP_drawor(PLFLT x, PLFLT y);
  568.  
  569. /* Draw polyline in physical coordinates. */
  570.  
  571. void
  572. plP_draphy_poly(PLINT *x, PLINT *y, PLINT n);
  573.  
  574. /* Draw polyline in world coordinates. */
  575.  
  576. void
  577. plP_drawor_poly(PLFLT *x, PLFLT *y, PLINT n);
  578.  
  579. /* Sets up physical limits of plotting device and the mapping between
  580.    normalized device coordinates and physical coordinates. */
  581.  
  582. void
  583. plP_setphy(PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax);
  584.  
  585. /* Set up the subpage boundaries according to the current subpage selected */
  586.  
  587. void
  588. plP_setsub(void);
  589.  
  590. /* Get the floating point precision (in number of places) in numeric labels. */
  591.  
  592. void
  593. plP_gprec(PLINT *p_setp, PLINT *p_prec);
  594.  
  595. /* Adds a window to the window list (called by plwind).  */
  596.  
  597. void 
  598. plAddCWindow(CWindow window);
  599.  
  600. /* Resets all known windows (called by pladv). */
  601.  
  602. void 
  603. plClrCWindows(void);
  604.  
  605.     /* Functions that return floats */
  606.  
  607. /* Computes the length of a string in mm, including escape sequences. */
  608.  
  609. PLFLT
  610. plstrl(const char *string);
  611.  
  612.     /* Conversion functions */
  613.  
  614. /* device coords to millimeters from bottom left-hand corner (x) */
  615.  
  616. PLFLT
  617. plP_dcmmx(PLFLT x);
  618.  
  619. /* device coords to millimeters from bottom left-hand corner (y) */
  620.  
  621. PLFLT
  622. plP_dcmmy(PLFLT y);
  623.  
  624. /* define transformations between device coords and subpage coords (x) */
  625.  
  626. PLFLT
  627. plP_dcscx(PLFLT x);
  628.  
  629. /* define transformations between device coords and subpage coords (y) */
  630.  
  631. PLFLT
  632. plP_dcscy(PLFLT y);
  633.  
  634. /* millimeters from bottom left corner into device coords (x) */
  635.  
  636. PLFLT
  637. plP_mmdcx(PLFLT x);
  638.  
  639. /* millimeters from bottom left corner into device coords (y) */
  640.  
  641. PLFLT
  642. plP_mmdcy(PLFLT y);
  643.  
  644. /* subpage coords to device coords (x) */
  645.  
  646. PLFLT
  647. plP_scdcx(PLFLT x);
  648.  
  649. /* subpage coords to device coords (y) */
  650.  
  651. PLFLT
  652. plP_scdcy(PLFLT y);
  653.  
  654. /* world coords into millimeters (x) */
  655.  
  656. PLFLT
  657. plP_wcmmx(PLFLT x);
  658.  
  659. /* world coords into millimeters (y) */
  660.  
  661. PLFLT
  662. plP_wcmmy(PLFLT y);
  663.  
  664. /* undocumented transformation for 3d plot routines (x) */
  665.  
  666. PLFLT
  667. plP_w3wcx(PLFLT x, PLFLT y, PLFLT z);
  668.  
  669. /* undocumented transformation for 3d plot routines (y) */
  670.  
  671. PLFLT
  672. plP_w3wcy(PLFLT x, PLFLT y, PLFLT z);
  673.  
  674. /* device coords to physical coords (x) */
  675.  
  676. PLINT
  677. plP_dcpcx(PLFLT x);
  678.  
  679. /* device coords to physical coords (y) */
  680.  
  681. PLINT
  682. plP_dcpcy(PLFLT y);
  683.  
  684. /* millimeters from bottom left-hand corner to physical coords (x) */
  685.  
  686. PLINT
  687. plP_mmpcx(PLFLT x);
  688.  
  689. /* millimeters from bottom left-hand corner to physical coords (y) */
  690.  
  691. PLINT
  692. plP_mmpcy(PLFLT y);
  693.  
  694. /* world coords to physical coords (x) */
  695.  
  696. PLINT
  697. plP_wcpcx(PLFLT x);
  698.  
  699. /* world coords to physical coords (y) */
  700.  
  701. PLINT
  702. plP_wcpcy(PLFLT y);
  703.  
  704. /* Gets the character digitisation of Hershey table entry "char". */
  705.  
  706. PLINT
  707. plcvec(PLINT ch, SCHAR ** xygr);
  708.  
  709. /* Similar to strpos, but searches for occurence of string str2. */
  710.  
  711. PLINT
  712. plP_stindex(const char *str1, const char *str2);
  713.  
  714. /* Searches string str for first occurence of character chr.  */
  715.  
  716. PLINT
  717. plP_strpos(char *str, int chr);
  718.  
  719. /* Searches string str for character chr (case insensitive). */
  720.  
  721. PLINT
  722. plP_stsearch(const char *str, int chr);
  723.  
  724.     /* Driver calls */
  725.  
  726. /* Initialize device. */
  727.  
  728. void
  729. plP_init(void);
  730.  
  731. /* Draw line between two points */
  732.  
  733. void
  734. plP_line(short *x, short *y);
  735.  
  736. /* Draw polyline */
  737.  
  738. void
  739. plP_polyline(short *x, short *y, PLINT npts);
  740.  
  741. /* Fill polygon */
  742.  
  743. void
  744. plP_fill(short *x, short *y, PLINT npts);
  745.  
  746. /* End of page */
  747.  
  748. void
  749. plP_eop(void);
  750.  
  751. /* End of page */
  752.  
  753. void
  754. plP_bop(void);
  755.  
  756. /* Tidy up device (flush buffers, close file, etc.) */
  757.  
  758. void
  759. plP_tidy(void);
  760.  
  761. /* Change state. */
  762.  
  763. void
  764. plP_state(PLINT op);
  765.  
  766. /* Escape function, for driver-specific commands. */
  767.  
  768. void
  769. plP_esc(PLINT op, void *ptr);
  770.  
  771. /* Return file pointer to lib file. */
  772.  
  773. FILE *
  774. plLibOpen(char *fn);
  775.  
  776. #ifdef __cplusplus
  777. }
  778. #endif
  779.  
  780. #endif    /* __PLPLOTP_H__ */
  781.